import Vue from "vue"
import VueRouter from "vue-router"
import Layout from "../layout/index.vue"

Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    name: "Layout",
    component: Layout,
    children: [
      {
        path: "home",
        name: "home",
        component: () => import("../views/Home.vue"),
      },
      {
        path: "home2",
        name: "home2",
        component: () => import("../views/Home2.vue"),
      },
      {
        path: "cardetails",
        name: "CarDetails",
        component: () => import("../views/CarDetails.vue"),
      },
      {
        path: "PlanningDetails",
        name: "PlanningDetails",
        component: () => import("../views/PlanningDetails.vue"),
      },
      {
        path: "UserCenter",
        name: "UserCenter",
        component: () => import("../views/UserCenter/UserCenter.vue"),
      },
      {
        path: "Login",
        name: "Login",
        component: () => import("../views/UserCenter/Login.vue"),
      },
      {
        path: "Register",
        name: "Register",
        component: () => import("../views/UserCenter/Register.vue"),
      },
      {
        path: "homelist",
        name: "homelist",
        component: () => import("../views/HomeList.vue"),
      },
      {
        path: "WeddingPhotes",
        name: "WeddingPhotes",
        component: () => import("../views/WeddingPhotes.vue"),
      },
      {
        path: "photedetails",
        name: "PhoteDetails",
        component: () => import("../views/PhoteDetails.vue"),
      },
    ],
  },
]

const router = new VueRouter({
  routes,
})

export default router
